package com.jfinal.module.wxchat.message.input;

import com.thoughtworks.xstream.annotations.XStreamAlias;

/**
 * <p>
 * 接收语音识别结果
 * </p>
 *
 * @author Jerry Ou
 * @version 1.0 2014-02-12 13:41
 * @since JDK 1.6
 */
@XStreamAlias("xml")
public class RecognitionVoiceInputMessage extends VoiceInputMessage {
    /** 语音识别结果，UTF8编码 */
    private String Recognition;

    public RecognitionVoiceInputMessage(Builder builder) {
        super(builder);
        this.Recognition = builder.Recognition;
    }

    public static class Builder extends VoiceInputMessage.Builder {
        private String Recognition;

        public Builder(String toUserName, String fromUserName, long createTime, String msgType) {
            super(toUserName, fromUserName, createTime, msgType);
        }

        public Builder recognition(String recognition) {
            this.Recognition = recognition;
            return this;
        }

        @Override
        public RecognitionVoiceInputMessage build() {
            return new RecognitionVoiceInputMessage(this);
        }
    }
}
/*
 <xml>
    <ToUserName><![CDATA[toUser]]></ToUserName>
    <FromUserName><![CDATA[fromUser]]></FromUserName>
    <CreateTime>1357290913</CreateTime>
    <MsgType><![CDATA[voice]]></MsgType>
    <MediaId><![CDATA[media_id]]></MediaId>
    <Format><![CDATA[Format]]></Format>
    <Recognition><![CDATA[腾讯微信团队]]></Recognition>
    <MsgId>1234567890123456</MsgId>
 </xml>
*/